Skip to content

phase a/fix bootstrap listener#47

Merged
aksOps merged 2 commits into
mainfrom
phase-a/fix-bootstrap-listener
Apr 17, 2026
Merged

phase a/fix bootstrap listener#47
aksOps merged 2 commits into
mainfrom
phase-a/fix-bootstrap-listener

Conversation

@aksOps

@aksOps aksOps commented Apr 17, 2026

Copy link
Copy Markdown
Contributor
  • chore(baseline): scaffold baseline dirs and gitignore
  • chore(baseline): add seed-repo fetch script with pinned commits
  • chore(baseline): add Maven verify + JaCoCo capture script
  • chore(baseline): add flaky-test scan (N repeated runs)
  • chore(baseline): add SpotBugs baseline capture
  • chore(baseline): add dependency-tree + license snapshot capture
  • chore(baseline): add frontend audit (npm audit + Vite + Playwright)
  • chore(baseline): add index/enrich/serve-smoke pipeline capture
  • chore(baseline): run pipeline on realworld-express
  • chore(baseline): add OWASP dependency-check baseline capture (NVD sync needs retry)
  • chore(baseline): add consolidator and publish first BASELINE.md
  • fix(baseline): probe /api/stats for serve-smoke readiness instead of /actuator/health
  • fix(serve): publish availability events so /actuator/health returns 200
  • fix(serve): invoke GraphBootstrapper directly instead of via dead ApplicationReadyEvent listener
  • docs(baseline): mark GraphBootstrapper dead-listener gap RESOLVED

@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@aksOps has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 55 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 14 minutes and 55 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6c951866-1676-4df7-a3ad-d76a71ceac72

📥 Commits

Reviewing files that changed from the base of the PR and between 3beafd9 and 1c227bc.

📒 Files selected for processing (3)
  • docs/superpowers/baselines/2026-04-17/BASELINE.md
  • src/main/java/io/github/randomcodespace/iq/cli/ServeCommand.java
  • src/main/java/io/github/randomcodespace/iq/config/GraphBootstrapper.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase-a/fix-bootstrap-listener

Comment @coderabbitai help to get the list of available commands and usage tips.

aksOps added 2 commits April 17, 2026 13:03
…licationReadyEvent listener

GraphBootstrapper's H2->Neo4j fallback was registered for
@eventlistener(ApplicationReadyEvent.class), but that event never
fires during a normal serve run because ServeCommand.call() blocks
in Thread.join() as a CommandLineRunner. Consequence: if someone
shipped a bundle with only the H2 analysis cache (no enriched Neo4j
graph) and ran `code-iq serve`, Neo4j would stay empty forever and
graph-traversal queries would return nothing. Not observed in our
pipeline today only because `enrich` always runs before `serve`.

Fix:
- Drop @eventlistener from bootstrapNeo4jFromCache() and its
  associated imports (ApplicationReadyEvent, @eventlistener).
- ServeCommand.call() now calls graphBootstrapper.bootstrapNeo4jFromCache()
  explicitly before the Neo4j status report, so the advertised
  node/edge counts reflect post-bootstrap state. Injection is
  Optional since the bean only exists in the "serving" profile
  (matches the existing @Profile + @ConditionalOnBean guards).
- Class javadoc updated to document the new invocation model and
  the reason the event-listener path did not work.

The method is idempotent (guards on count>0 and on missing H2 file),
so moving the invocation is safe even in scenarios where Neo4j is
already populated by `enrich`.

Tests: existing GraphBootstrapperTest still passes unchanged (it calls
the method directly).

Integration verification:
  # full pipeline to populate both H2 + Neo4j
  ./scripts/baseline/run-pipeline.sh spring-petclinic
  # wipe ONLY Neo4j; keep H2
  rm -rf .seeds/spring-petclinic/.code-iq/graph
  # re-run serve
  java -jar target/code-iq-*-cli.jar serve .seeds/spring-petclinic --port 18080 &
  # wait for /actuator/health=200, then:
  curl http://127.0.0.1:18080/api/stats

Before this fix: Neo4j empty, stats=0.
After this fix:  log shows "Bootstrapped Neo4j with 634 nodes and
                  604 edges from H2 cache", /api/stats returns 677
                  nodes / 604 edges / 65 files.
@aksOps aksOps force-pushed the phase-a/fix-bootstrap-listener branch from 08aadd1 to 1c227bc Compare April 17, 2026 13:03
@aksOps aksOps merged commit a131a80 into main Apr 17, 2026
5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

aksOps added a commit that referenced this pull request Apr 23, 2026
…ructured/sql taxonomy (#47)

Group language/format detectors under semantic parent packages:

- jvm/        -> java, kotlin, scala
- markup/     -> docs (renamed)
- systems/    -> rust, cpp
- script/     -> shell
- structured/ -> config (renamed)
- sql/        -> placeholder (follow-up #48)

Imports only; zero behavior change. All 3278 tests still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aksOps added a commit that referenced this pull request Apr 23, 2026
…ructured/sql taxonomy (#47) (#56)

Group language/format detectors under semantic parent packages:

- jvm/        -> java, kotlin, scala
- markup/     -> docs (renamed)
- systems/    -> rust, cpp
- script/     -> shell
- structured/ -> config (renamed)
- sql/        -> placeholder (follow-up #48)

Imports only; zero behavior change. All 3278 tests still green.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksOps aksOps deleted the phase-a/fix-bootstrap-listener branch April 26, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant